<%@page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Air Transport - Cancellation</title>
</head>
<body>

<c:if test="${not user.accessed}">
	<c:redirect url="index.html"></c:redirect>
</c:if>

<c:if test="${not user.loggedIn}">
	<c:redirect url="index.html"></c:redirect>
</c:if>

<c:if test="${empty flight}">
	<c:redirect url="main.html"></c:redirect>
</c:if>

<c:if test="${empty passenger}">
	<c:redirect url="main.html"></c:redirect>
</c:if>

<h2><u>Air Transport Service - Cancellation</u></h2>

<jsp:include page="header.jsp"></jsp:include>

<table border="1">
	<tr bgcolor="lightgrey">
		<td style="BACKGROUND-COLOR: #b7d0ec;">Flight ID:</td>
		<td style="BACKGROUND-COLOR: #e7cfad;">${ flight.id}</td>
	</tr>
	<tr bgcolor="lightgrey">
		<td style="BACKGROUND-COLOR: #b7d0ec;">Departure Time:</td>
		<td style="BACKGROUND-COLOR: #e7cfad;">${flight.departureTimeFormated}</td>
	</tr>
	<tr bgcolor="lightgrey">
		<td style="BACKGROUND-COLOR: #b7d0ec;">Source:</td>
		<td style="BACKGROUND-COLOR: #e7cfad;">${flight.source }</td>
	</tr>
	<tr bgcolor="lightgrey">
		<td style="BACKGROUND-COLOR: #b7d0ec;">Destination:</td>
		<td style="BACKGROUND-COLOR: #e7cfad;">${flight.destination }</td>
	</tr>
	<tr bgcolor="lightgrey">
		<td style="BACKGROUND-COLOR: #b7d0ec;">Passenger:</td>
		<td style="BACKGROUND-COLOR: #e7cfad;">${passenger}</td>
	</tr>
	<tr bgcolor="lightgrey">
		<td
			style="FONT-WEIGHT: bold; COLOR: #ff0000; BACKGROUND-COLOR: #b7d0ec;">Confirmation:</td>
		<form method="get" action="cancellation_result.html">
			<td align="center">
				<input type="hidden" name="jmbg" value="${passenger.jmbg }" /> 
				<input type="hidden" name="flightid" value="${flight.id }" /> 
				<input type="submit" value="Confirm" />
			</td>
		</form>
	</tr>
</table>


<hr width="30%" align="left">


<a href="main.html">Main Page - Flight List</a>


<jsp:include page="footer.jsp"></jsp:include>

</body>
</html>